<?php
class Sfs_View_Helper_FlashMessenger extends Zend_View_Helper_Abstract
{
    public function flashMessenger()
    {
        $this->view->addScriptPath(Zend_Layout::getMvcInstance()->getLayoutPath());

        $flashMsgHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');
        $this->view->assign('messages', $flashMsgHelper->getMessages());

        $this->view->addScriptPath(APPLICATION_PATH . DIRECTORY_SEPARATOR .'modules'.
        DIRECTORY_SEPARATOR .'default'.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'scripts');
        return $this->view->render('_partial/_messages.phtml');
    }
}